package com.atldy.cloudgrains.controller;

import com.atldy.cloudgrains.exception.BusinessException;
import com.atldy.common.enums.StatusCodeEnum;
import com.atldy.common.vo.ResultResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @version 1.0
 * @Author: li-dong-yang
 * @CreateTime: 2021-09-15 18:23
 * @Description：
 */
@RestController
public class TestController {


    @GetMapping("/test")
    public ResultResponse test(){
        //int i=1/0;
        if (true){
            throw new BusinessException(StatusCodeEnum.AUTHORIZED);
        }
        return new ResultResponse<>(0,"13e");
        //return "sss";
    }

}